import http from '@zt/zongheng-pro/framework/http'

/**
 * 分页
 * @param {Object} params
 */
export function leaveInfoList(data) {
  return http.post('leaveInfo/list', data)
}

/**
 * 删除
 * @param {Object} data
 */
export function leaveInfoDel(data) {
  return http.post('leaveInfo/delete', data)
}

/**
 * 新增或修改
 * @param {Object} data
 */
export function leaveInfoSaveOrUpdate(data) {
  const url = data.id ? 'leaveInfo/update' : 'leaveInfo/save'
  return http.post(url, data)
}

/**
 * 获取详情
 * @param {number} id
 * @returns
 */
export function leaveInfoGetById(id) {
  return http.get('leaveInfo/getById/' + id)
}

/**
 * 查询
 * @param {object} data
 * @returns
 */
export function leaveInfoSearch(data) {
  return http.post('leaveInfo/search', data)
}
